<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Maven高级 | 阿毛的博客</title><meta name="keywords" content="Maven"><meta name="author" content="myl"><meta name="copyright" content="myl"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="Maven高级1)分模块开发与设计1.1)工程模块与模块划分 1.2)ssm_pojo拆分新建模块 拷贝原始项目中对应的相关内容到ssm_pojo模块中 ​	实体类（User） ​	配置文件（无） 1.3)ssm_dao拆分 新建模块  拷贝原始项目中对应的相关内容到ssm_dao模块中  数据层接口（UserDao）  配置文件：保留与数据层相关配置文件(3个）  注意：分页插件在配置中与Sql">
<meta property="og:type" content="article">
<meta property="og:title" content="Maven高级">
<meta property="og:url" content="https://gitee.com/tgreen/myl-mm.git/2022/05/09/Maven%E9%AB%98%E7%BA%A7/index.html">
<meta property="og:site_name" content="阿毛的博客">
<meta property="og:description" content="Maven高级1)分模块开发与设计1.1)工程模块与模块划分 1.2)ssm_pojo拆分新建模块 拷贝原始项目中对应的相关内容到ssm_pojo模块中 ​	实体类（User） ​	配置文件（无） 1.3)ssm_dao拆分 新建模块  拷贝原始项目中对应的相关内容到ssm_dao模块中  数据层接口（UserDao）  配置文件：保留与数据层相关配置文件(3个）  注意：分页插件在配置中与Sql">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg">
<meta property="article:published_time" content="2022-05-09T09:00:00.046Z">
<meta property="article:modified_time" content="2022-05-09T11:33:26.304Z">
<meta property="article:author" content="myl">
<meta property="article:tag" content="Maven">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg"><link rel="shortcut icon" href="/myl-mm/img/favicon.png"><link rel="canonical" href="https://gitee.com/tgreen/myl-mm.git/2022/05/09/Maven%E9%AB%98%E7%BA%A7/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/myl-mm/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/myl-mm/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Maven高级',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2022-05-09 19:33:26'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 5.4.2"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/myl-mm/archives/"><div class="headline">文章</div><div class="length-num">22</div></a><a href="/myl-mm/tags/"><div class="headline">标签</div><div class="length-num">11</div></a><a href="/myl-mm/categories/"><div class="headline">分类</div><div class="length-num">7</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/myl-mm/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/myl-mm/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></div><div class="menus_item"><a class="site-page" href="/myl-mm/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/long1.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/myl-mm/">阿毛的博客</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/myl-mm/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/myl-mm/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></div><div class="menus_item"><a class="site-page" href="/myl-mm/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">Maven高级</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2022-05-09T09:00:00.046Z" title="发表于 2022-05-09 17:00:00">2022-05-09</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2022-05-09T11:33:26.304Z" title="更新于 2022-05-09 19:33:26">2022-05-09</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/myl-mm/categories/Maven/">Maven</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="Maven高级"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="Maven高级"><a href="#Maven高级" class="headerlink" title="Maven高级"></a>Maven高级</h1><h2 id="1-分模块开发与设计"><a href="#1-分模块开发与设计" class="headerlink" title="1)分模块开发与设计"></a>1)分模块开发与设计</h2><h3 id="1-1-工程模块与模块划分"><a href="#1-1-工程模块与模块划分" class="headerlink" title="1.1)工程模块与模块划分"></a><strong>1.1)工程模块与模块划分</strong></h3><p><img src="/myl-mm/assets%5C1592058795771.png" alt="1592058795771"></p>
<h3 id="1-2-ssm-pojo拆分"><a href="#1-2-ssm-pojo拆分" class="headerlink" title="1.2)ssm_pojo拆分"></a><strong>1.2)ssm_pojo拆分</strong></h3><p>新建模块</p>
<p>拷贝原始项目中对应的相关内容到ssm_pojo模块中</p>
<p>​	实体类（User）</p>
<p>​	配置文件（无）</p>
<h3 id="1-3-ssm-dao拆分"><a href="#1-3-ssm-dao拆分" class="headerlink" title="1.3)ssm_dao拆分"></a><strong>1.3)ssm_dao拆分</strong></h3><ul>
<li><p>新建模块</p>
</li>
<li><p>拷贝原始项目中对应的相关内容到ssm_dao模块中</p>
<ul>
<li><p>数据层接口（UserDao）</p>
</li>
<li><p>配置文件：保留与数据层相关配置文件(3个）</p>
</li>
<li><p>注意：分页插件在配置中与SqlSessionFactoryBean绑定，需要保留</p>
</li>
<li><p>pom.xml：引入数据层相关坐标即可，删除springmvc相关坐标</p>
<ul>
<li><p>spring</p>
</li>
<li><p>mybatis</p>
</li>
<li><p>spring 整合mybatis</p>
</li>
<li><p>mysql</p>
</li>
<li><p>druid</p>
</li>
<li><p>pagehelper</p>
</li>
<li><p>直接依赖ssm_pojo（对ssm_pojo模块执行install指令，将其安装到本地仓库）</p>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3 id="1-4-ssm-service拆分"><a href="#1-4-ssm-service拆分" class="headerlink" title="1.4)ssm_service拆分"></a><strong>1.4)ssm_service拆分</strong></h3><ul>
<li><p>新建模块</p>
</li>
<li><p>拷贝原始项目中对应的相关内容到ssm_service模块中</p>
<ul>
<li><p>业务层接口与实现类（UserService、UserServiceImpl）</p>
</li>
<li><p>配置文件：保留与数据层相关配置文件(1个）</p>
</li>
<li><p>pom.xml：引入数据层相关坐标即可，删除springmvc相关坐标</p>
<ul>
<li><p>spring</p>
</li>
<li><p>junit</p>
</li>
<li><p>spring 整合junit</p>
</li>
<li><p>直接依赖ssm_dao（对ssm_dao模块执行install指令，将其安装到本地仓库）</p>
</li>
<li><p>间接依赖ssm_pojo（由ssm_dao模块负责依赖关系的建立）</p>
</li>
</ul>
</li>
<li><p>修改service模块spring核心配置文件名，添加模块名称，格式：applicationContext-service.xml</p>
</li>
<li><p>修改dao模块spring核心配置文件名，添加模块名称，格式：applicationContext-dao.xml</p>
</li>
<li><p>修改单元测试引入的配置文件名称，由单个文件修改为多个文件</p>
</li>
</ul>
</li>
</ul>
<h3 id="1-5-ssm-control拆分"><a href="#1-5-ssm-control拆分" class="headerlink" title="1.5)ssm_control拆分"></a><strong>1.5)ssm_control拆分</strong></h3><ul>
<li><p>新建模块（使用webapp模板）</p>
</li>
<li><p>拷贝原始项目中对应的相关内容到ssm_controller模块中</p>
<ul>
<li><p>现层控制器类与相关设置类（UserController、异常相关……）</p>
</li>
<li><p>配置文件：保留与表现层相关配置文件(1个）、服务器相关配置文件（1个）</p>
</li>
<li><p>pom.xml：引入数据层相关坐标即可，删除springmvc相关坐标</p>
<ul>
<li><p>spring</p>
</li>
<li><p>springmvc</p>
</li>
<li><p>jackson</p>
</li>
<li><p>servlet</p>
</li>
<li><p>tomcat服务器插件</p>
</li>
<li><p>直接依赖ssm_service（对ssm_service模块执行install指令，将其安装到本地仓库）</p>
</li>
<li><p>间接依赖ssm_dao、ssm_pojo</p>
</li>
</ul>
</li>
<li><p>修改web.xml配置文件中加载spring环境的配置文件名称，使用*通配，加载所有applicationContext-开始的配置文件</p>
</li>
</ul>
</li>
</ul>
<p><strong>小节</strong></p>
<p>分模块开发</p>
<ul>
<li><p>模块中仅包含当前模块对应的功能类与配置文件</p>
</li>
<li><p>spring核心配置根据模块功能不同进行独立制作</p>
</li>
<li><p>当前模块所依赖的模块通过导入坐标的形式加入当前模块后才可以使用</p>
</li>
<li><p>web.xml需要加载所有的spring核心配置文件</p>
</li>
</ul>
<h2 id="2-聚合"><a href="#2-聚合" class="headerlink" title="2)聚合"></a>2)聚合</h2><h3 id="2-1-多模块构建维护"><a href="#2-1-多模块构建维护" class="headerlink" title="2.1)多模块构建维护"></a><strong>2.1)多模块构建维护</strong></h3><p><img src="/myl-mm/assets%5C1592059171938.png" alt="1592059171938"></p>
<h3 id="2-2-聚合"><a href="#2-2-聚合" class="headerlink" title="2.2)聚合"></a><strong>2.2)聚合</strong></h3><ul>
<li><p>作用：聚合用于快速构建maven工程，一次性构建多个项目&#x2F;模块。</p>
</li>
<li><p>制作方式：</p>
<ul>
<li><p>创建一个空模块，打包类型定义为pom</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">packaging</span>&gt;</span>pom<span class="tag">&lt;/<span class="name">packaging</span>&gt;</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>定义当前模块进行构建操作时关联的其他模块名称</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">modules</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">module</span>&gt;</span>../ssm_controller<span class="tag">&lt;/<span class="name">module</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">module</span>&gt;</span>../ssm_service<span class="tag">&lt;/<span class="name">module</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">module</span>&gt;</span>../ssm_dao<span class="tag">&lt;/<span class="name">module</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">module</span>&gt;</span>../ssm_pojo<span class="tag">&lt;/<span class="name">module</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">modules</span>&gt;</span></span><br></pre></td></tr></table></figure></li>
</ul>
</li>
</ul>
<p>注意事项：参与聚合操作的模块最终执行顺序与模块间的依赖关系有关，与配置顺序无关</p>
<h2 id="3-继承"><a href="#3-继承" class="headerlink" title="3)继承"></a>3)继承</h2><h3 id="3-1-模块依赖关系维护"><a href="#3-1-模块依赖关系维护" class="headerlink" title="3.1)模块依赖关系维护"></a><strong>3.1)模块依赖关系维护</strong></h3><p><img src="/myl-mm/assets%5C1592059337530.png" alt="1592059337530"></p>
<h3 id="3-2-继承"><a href="#3-2-继承" class="headerlink" title="3.2)继承"></a><strong>3.2)继承</strong></h3><ul>
<li><p>作用：通过继承可以实现在子工程中沿用父工程中的配置</p>
<ul>
<li>maven中的继承与java中的继承相似，在子工程中配置继承关系</li>
</ul>
</li>
<li><p>制作方式：</p>
<ul>
<li><p>在子工程中声明其父工程坐标与对应的位置</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--定义该工程的父工程--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">parent</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>com.itheima<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>ssm<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">version</span>&gt;</span>1.0-SNAPSHOT<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line">    <span class="comment">&lt;!--填写父工程的pom文件--&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">relativePath</span>&gt;</span>../ssm/pom.xml<span class="tag">&lt;/<span class="name">relativePath</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">parent</span>&gt;</span></span><br></pre></td></tr></table></figure></li>
</ul>
</li>
</ul>
<h3 id="3-3-继承依赖定义"><a href="#3-3-继承依赖定义" class="headerlink" title="3.3)继承依赖定义"></a><strong>3.3)继承依赖定义</strong></h3><p>在父工程中定义依赖管理</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--声明此处进行依赖管理--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependencyManagement</span>&gt;</span></span><br><span class="line">    <span class="comment">&lt;!--具体的依赖--&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!--spring环境--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-context<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">version</span>&gt;</span>5.1.9.RELEASE<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dependencyManagement</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h3 id="3-4-继承依赖使用"><a href="#3-4-继承依赖使用" class="headerlink" title="3.4)继承依赖使用"></a><strong>3.4)继承依赖使用</strong></h3><p>在子工程中定义依赖关系，无需声明依赖版本，版本参照父工程中依赖的版本</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependencies</span>&gt;</span></span><br><span class="line">    <span class="comment">&lt;!--spring环境--&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-context<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependencies</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h3 id="3-5-继承的资源"><a href="#3-5-继承的资源" class="headerlink" title="3.5)继承的资源"></a><strong>3.5)继承的资源</strong></h3><p>groupId：项目组ID，项目坐标的核心元素</p>
<p>version：项目版本，项目坐标的核心因素</p>
<p>description：项目的描述信息</p>
<p>organization：项目的组织信息</p>
<p>inceptionYear：项目的创始年份</p>
<p>url：项目的URL地址</p>
<p>developers：项目的开发者信息</p>
<p>contributors：项目的贡献者信息</p>
<p>distributionManagement：项目的部署配置</p>
<p>issueManagement：项目的缺陷跟踪系统信息</p>
<p>ciManagement：项目的持续集成系统信息</p>
<p>scm：项目的版本控制系统西溪</p>
<p>malilingLists：项目的邮件列表信息</p>
<p>properties：自定义的Maven属性</p>
<p>dependencies：项目的依赖配置</p>
<p>dependencyManagement：项目的依赖管理配置</p>
<p>repositories：项目的仓库配置</p>
<p>build：包括项目的源码目录配置、输出目录配置、插件配置、插件管理配置等</p>
<p>reporting：包括项目的报告输出目录配置、报告插件配置等</p>
<h3 id="3-6-继承与聚合"><a href="#3-6-继承与聚合" class="headerlink" title="3.6)继承与聚合"></a><strong>3.6)继承与聚合</strong></h3><p>作用</p>
<ul>
<li><p>聚合用于快速构建项目</p>
</li>
<li><p>继承用于快速配置</p>
</li>
</ul>
<p>相同点：</p>
<ul>
<li><p>聚合与继承的pom.xml文件打包方式均为pom，可以将两种关系制作到同一个pom文件中</p>
</li>
<li><p>聚合与继承均属于设计型模块，并无实际的模块内容</p>
</li>
</ul>
<p>不同点：</p>
<ul>
<li><p>聚合是在当前模块中配置关系，聚合可以感知到参与聚合的模块有哪些</p>
</li>
<li><p>继承是在子模块中配置关系，父模块无法感知哪些子模块继承了自己</p>
</li>
</ul>
<h2 id="4-属性"><a href="#4-属性" class="headerlink" title="4)属性"></a>4)属性</h2><h3 id="4-1-版本统一的重要性"><a href="#4-1-版本统一的重要性" class="headerlink" title="4.1)版本统一的重要性"></a><strong>4.1)版本统一的重要性</strong></h3><p><img src="/myl-mm/assets%5C1592059609949.png" alt="1592059609949"></p>
<h3 id="4-2-属性类别"><a href="#4-2-属性类别" class="headerlink" title="4.2)属性类别"></a><strong>4.2)属性类别</strong></h3><p>1.自定义属性</p>
<p>2.内置属性</p>
<p>3.Setting属性</p>
<p>4.Java系统属性</p>
<p>5.环境变量属性</p>
<h3 id="4-3-属性类别：自定义属性"><a href="#4-3-属性类别：自定义属性" class="headerlink" title="4.3)属性类别：自定义属性"></a><strong>4.3)属性类别：自定义属性</strong></h3><p>作用</p>
<ul>
<li>等同于定义变量，方便统一维护</li>
</ul>
<p>定义格式：</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--定义自定义属性--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">properties</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">spring.version</span>&gt;</span>5.1.9.RELEASE<span class="tag">&lt;/<span class="name">spring.version</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">junit.version</span>&gt;</span>4.12<span class="tag">&lt;/<span class="name">junit.version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">properties</span>&gt;</span></span><br></pre></td></tr></table></figure>

<ul>
<li><p>聚合与继承的pom.xml文件打包方式均为pom，可以将两种关系制作到同一个pom文件中</p>
</li>
<li><p>聚合与继承均属于设计型模块，并无实际的模块内容</p>
</li>
</ul>
<p>调用格式：</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dependency</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">groupId</span>&gt;</span>org.springframework<span class="tag">&lt;/<span class="name">groupId</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>spring-context<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">version</span>&gt;</span>$&#123;spring.version&#125;<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dependency</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h3 id="4-4-属性类别：内置属性"><a href="#4-4-属性类别：内置属性" class="headerlink" title="4.4)属性类别：内置属性"></a><strong>4.4)属性类别：内置属性</strong></h3><p>作用</p>
<ul>
<li>使用maven内置属性，快速配置</li>
</ul>
<p>调用格式：</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$&#123;basedir&#125;</span><br><span class="line">$&#123;version&#125;</span><br></pre></td></tr></table></figure>

<h3 id="4-5-属性类别：Setting属性"><a href="#4-5-属性类别：Setting属性" class="headerlink" title="4.5)属性类别：Setting属性"></a><strong>4.5)属性类别：Setting属性</strong></h3><p>作用</p>
<ul>
<li>使用Maven配置文件setting.xml中的标签属性，用于动态配置</li>
</ul>
<p>调用格式：</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$&#123;settings.localRepository&#125; </span><br></pre></td></tr></table></figure>

<h3 id="4-6-属性类别：Java系统属性"><a href="#4-6-属性类别：Java系统属性" class="headerlink" title="4.6)属性类别：Java系统属性"></a><strong>4.6)属性类别：Java系统属性</strong></h3><p>作用</p>
<ul>
<li>读取Java系统属性</li>
</ul>
<p>调用格式</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$&#123;user.home&#125; </span><br></pre></td></tr></table></figure>

<p>系统属性查询方式</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mvn help:system </span><br></pre></td></tr></table></figure>

<h3 id="4-7-属性类别：环境变量属性"><a href="#4-7-属性类别：环境变量属性" class="headerlink" title="4.7)属性类别：环境变量属性"></a><strong>4.7)属性类别：环境变量属性</strong></h3><p>作用</p>
<ul>
<li>使用Maven配置文件setting.xml中的标签属性，用于动态配置</li>
</ul>
<p>调用格式</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$&#123;env.JAVA_HOME&#125; </span><br></pre></td></tr></table></figure>

<p>环境变量属性查询方式</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mvn help:system </span><br></pre></td></tr></table></figure>

<h2 id="5-版本管理"><a href="#5-版本管理" class="headerlink" title="5)版本管理"></a>5)版本管理</h2><h3 id="5-1-工程版本区分"><a href="#5-1-工程版本区分" class="headerlink" title="5.1)工程版本区分"></a><strong>5.1)工程版本区分</strong></h3><p><img src="/myl-mm/assets%5C1592060021315.png" alt="1592060021315"></p>
<h3 id="5-2-工程版本"><a href="#5-2-工程版本" class="headerlink" title="5.2)工程版本"></a><strong>5.2)工程版本</strong></h3><ul>
<li><p>SNAPSHOT（快照版本）</p>
<ul>
<li><p>项目开发过程中，为方便团队成员合作，解决模块间相互依赖和时时更新的问题，开发者对每个模块进行构建的时候，输出的临时性版本叫快照版本（测试阶段版本）</p>
</li>
<li><p>u快照版本会随着开发的进展不断更新</p>
</li>
</ul>
</li>
<li><p>RELEASE（发布版本）</p>
<ul>
<li>u项目开发到进入阶段里程碑后，向团队外部发布较为稳定的版本，这种版本所对应的构件文件是稳定的，即便进行功能的后续开发，也不会改变当前发布版本内容，这种版本称为发布版本</li>
</ul>
</li>
</ul>
<h3 id="5-3-工程版本号约定"><a href="#5-3-工程版本号约定" class="headerlink" title="5.3)工程版本号约定"></a><strong>5.3)工程版本号约定</strong></h3><p>约定规范：</p>
<ul>
<li><p>&lt;主版本&gt;.&lt;次版本&gt;.&lt;增量版本&gt;.&lt;里程碑版本&gt;</p>
</li>
<li><p>主版本：表示项目重大架构的变更，如：spring5相较于spring4的迭代</p>
</li>
<li><p>次版本：表示有较大的功能增加和变化，或者全面系统地修复漏洞</p>
</li>
<li><p>增量版本：表示有重大漏洞的修复</p>
</li>
<li><p>里程碑版本：表明一个版本的里程碑（版本内部）。这样的版本同下一个正式版本相比，相对来说不是很稳定，有待更多的测试</p>
</li>
</ul>
<p>范例：</p>
<ul>
<li>5.1.9.RELEASE</li>
</ul>
<h2 id="6-资源配置"><a href="#6-资源配置" class="headerlink" title="6)资源配置"></a>6)资源配置</h2><h3 id="6-1-资源配置多文件维护"><a href="#6-1-资源配置多文件维护" class="headerlink" title="6.1)资源配置多文件维护"></a><strong>6.1)资源配置多文件维护</strong></h3><p><img src="/myl-mm/assets%5C1592060128683.png" alt="1592060128683"></p>
<h3 id="6-2-配置文件引用pom属性"><a href="#6-2-配置文件引用pom属性" class="headerlink" title="6.2)配置文件引用pom属性"></a><strong>6.2)配置文件引用pom属性</strong></h3><ul>
<li>作用<ul>
<li>在任意配置文件中加载pom文件中定义的属性</li>
</ul>
</li>
<li>调用格式</li>
</ul>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$&#123;jdbc.url&#125; </span><br></pre></td></tr></table></figure>

<ul>
<li><p>开启配置文件加载pom属性</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--配置资源文件对应的信息--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">resources</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">resource</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!--设定配置文件对应的位置目录，支持使用属性动态设定路径--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">directory</span>&gt;</span>$&#123;project.basedir&#125;/src/main/resources<span class="tag">&lt;/<span class="name">directory</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!--开启对配置文件的资源加载过滤--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">filtering</span>&gt;</span>true<span class="tag">&lt;/<span class="name">filtering</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">resource</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">resources</span>&gt;</span></span><br></pre></td></tr></table></figure></li>
</ul>
<h2 id="7-多环境开发配置"><a href="#7-多环境开发配置" class="headerlink" title="7)多环境开发配置"></a>7)多环境开发配置</h2><h3 id="7-1-多环境兼容"><a href="#7-1-多环境兼容" class="headerlink" title="7.1)多环境兼容"></a><strong>7.1)多环境兼容</strong></h3><p><img src="/myl-mm/assets%5C1592060250502.png" alt="1592060250502"></p>
<h3 id="7-2-多环境配置"><a href="#7-2-多环境配置" class="headerlink" title="7.2)多环境配置"></a><strong>7.2)多环境配置</strong></h3><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--创建多环境--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">profiles</span>&gt;</span></span><br><span class="line">    <span class="comment">&lt;!--定义具体的环境：生产环境--&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">profile</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!--定义环境对应的唯一名称--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">id</span>&gt;</span>pro_env<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!--定义环境中专用的属性值--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">properties</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">jdbc.url</span>&gt;</span>jdbc:mysql://127.1.1.1:3306/ssm_db<span class="tag">&lt;/<span class="name">jdbc.url</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">properties</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!--设置默认启动--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">activation</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">activeByDefault</span>&gt;</span>true<span class="tag">&lt;/<span class="name">activeByDefault</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">activation</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">profile</span>&gt;</span></span><br><span class="line">    <span class="comment">&lt;!--定义具体的环境：开发环境--&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">profile</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">id</span>&gt;</span>dev_env<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line">        ……</span><br><span class="line">    <span class="tag">&lt;/<span class="name">profile</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">profiles</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h3 id="7-3-加载指定环境"><a href="#7-3-加载指定环境" class="headerlink" title="7.3)加载指定环境"></a><strong>7.3)加载指定环境</strong></h3><p>作用</p>
<ul>
<li>加载指定环境配置</li>
</ul>
<p>调用格式</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mvn 指令 –P 环境定义id</span><br></pre></td></tr></table></figure>

<p>范例</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mvn install –P pro_env</span><br></pre></td></tr></table></figure>

<h2 id="8-跳过测试"><a href="#8-跳过测试" class="headerlink" title="8)跳过测试"></a>8)跳过测试</h2><h3 id="8-1-跳过测试环节的应用场景"><a href="#8-1-跳过测试环节的应用场景" class="headerlink" title="8.1)跳过测试环节的应用场景"></a><strong>8.1)跳过测试环节的应用场景</strong></h3><p>整体模块功能未开发</p>
<p>模块中某个功能未开发完毕</p>
<p>单个功能更新调试导致其他功能失败</p>
<p>快速打包</p>
<p>……</p>
<h3 id="8-2-使用命令跳过测试"><a href="#8-2-使用命令跳过测试" class="headerlink" title="8.2)使用命令跳过测试"></a><strong>8.2)使用命令跳过测试</strong></h3><p>命令</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mvn 指令 –D skipTests</span><br></pre></td></tr></table></figure>

<p>注意事项</p>
<ul>
<li>执行的指令生命周期必须包含测试环节</li>
</ul>
<h3 id="8-3-使用界面操作跳过测试"><a href="#8-3-使用界面操作跳过测试" class="headerlink" title="8.3)使用界面操作跳过测试"></a><strong>8.3)使用界面操作跳过测试</strong></h3><p><img src="/myl-mm/assets%5C1592060441318.png" alt="1592060441318"></p>
<h3 id="8-4-使用配置跳过测试"><a href="#8-4-使用配置跳过测试" class="headerlink" title="8.4)使用配置跳过测试"></a><strong>8.4)使用配置跳过测试</strong></h3><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">plugin</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">artifactId</span>&gt;</span>maven-surefire-plugin<span class="tag">&lt;/<span class="name">artifactId</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">version</span>&gt;</span>2.22.1<span class="tag">&lt;/<span class="name">version</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">configuration</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">skipTests</span>&gt;</span>true<span class="tag">&lt;/<span class="name">skipTests</span>&gt;</span><span class="comment">&lt;!--设置跳过测试--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">includes</span>&gt;</span> <span class="comment">&lt;!--包含指定的测试用例--&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">include</span>&gt;</span>**/User*Test.java<span class="tag">&lt;/<span class="name">include</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">includes</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">excludes</span>&gt;</span><span class="comment">&lt;!--排除指定的测试用例--&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">exclude</span>&gt;</span>**/User*TestCase.java<span class="tag">&lt;/<span class="name">exclude</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">excludes</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">configuration</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">plugin</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h2 id="9-私服"><a href="#9-私服" class="headerlink" title="9)私服"></a>9)私服</h2><h3 id="9-1-分模块合作开发"><a href="#9-1-分模块合作开发" class="headerlink" title="9.1)分模块合作开发"></a><strong>9.1)分模块合作开发</strong></h3><p><img src="/myl-mm/assets%5C1592060518477.png" alt="1592060518477"></p>
<h3 id="9-2-Nexus"><a href="#9-2-Nexus" class="headerlink" title="9.2)Nexus"></a><strong>9.2)Nexus</strong></h3><p>Nexus是Sonatype公司的一款maven私服产品</p>
<p>下载地址：<a target="_blank" rel="noopener" href="https://help.sonatype.com/repomanager3/download">https://help.sonatype.com/repomanager3/download</a> </p>
<h3 id="9-3-Nexus-安装、启动与配置"><a href="#9-3-Nexus-安装、启动与配置" class="headerlink" title="9.3)Nexus*安装、启动与配置"></a><strong>9.3)Nexus*安装、启动与配置</strong></h3><p>启动服务器（命令行启动）</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nexus.exe /run nexus</span><br></pre></td></tr></table></figure>

<p>访问服务器（默认端口：8081）</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">http://localhost:8081</span><br></pre></td></tr></table></figure>

<p>修改基础配置信息</p>
<ul>
<li>安装路径下etc目录中nexus-default.properties文件保存有nexus基础配置信息，例如默认访问端口</li>
</ul>
<p>修改服务器运行配置信息</p>
<ul>
<li>安装路径下bin目录中nexus.vmoptions文件保存有nexus服务器启动对应的配置信息，例如默认占用内存空间</li>
</ul>
<h3 id="9-4-私服资源获取"><a href="#9-4-私服资源获取" class="headerlink" title="9.4)私服资源获取"></a><strong>9.4)私服资源获取</strong></h3><p><img src="/myl-mm/assets%5C1592060611850.png" alt="1592060611850"></p>
<h3 id="9-5-仓库分类"><a href="#9-5-仓库分类" class="headerlink" title="9.5)仓库分类"></a><strong>9.5)仓库分类</strong></h3><p>宿主仓库hosted </p>
<ul>
<li>保存无法从中央仓库获取的资源<ul>
<li>自主研发</li>
<li>第三方非开源项目</li>
</ul>
</li>
</ul>
<p>代理仓库proxy </p>
<ul>
<li>代理远程仓库，通过nexus访问其他公共仓库，例如中央仓库</li>
</ul>
<p>仓库组group </p>
<ul>
<li>将若干个仓库组成一个群组，简化配置</li>
<li>仓库组不能保存资源，属于设计型仓库</li>
</ul>
<h3 id="9-6-资源上传"><a href="#9-6-资源上传" class="headerlink" title="9.6)资源上传"></a><strong>9.6)资源上传</strong></h3><p>上传资源时提供对应的信息</p>
<ul>
<li><p>保存的位置（宿主仓库）</p>
</li>
<li><p>资源文件</p>
</li>
<li><p>对应坐标</p>
</li>
</ul>
<h3 id="9-7-idea环境中资源上传与下载"><a href="#9-7-idea环境中资源上传与下载" class="headerlink" title="9.7)idea环境中资源上传与下载"></a><strong>9.7)idea环境中资源上传与下载</strong></h3><p><img src="/myl-mm/assets%5C1592060719086.png" alt="1592060719086"></p>
<h3 id="9-8-访问私服配置（本地仓库访问私服）"><a href="#9-8-访问私服配置（本地仓库访问私服）" class="headerlink" title="9.8)访问私服配置（本地仓库访问私服）"></a><strong>9.8)访问私服配置（本地仓库访问私服）</strong></h3><p>配置本地仓库访问私服的权限（setting.xml）</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">servers</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">server</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">id</span>&gt;</span>heima-release<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">username</span>&gt;</span>admin<span class="tag">&lt;/<span class="name">username</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">password</span>&gt;</span>admin<span class="tag">&lt;/<span class="name">password</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">server</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">server</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">id</span>&gt;</span>heima-snapshots<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">username</span>&gt;</span>admin<span class="tag">&lt;/<span class="name">username</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">password</span>&gt;</span>admin<span class="tag">&lt;/<span class="name">password</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">server</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">servers</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>配置本地仓库资源来源（setting.xml）</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">mirrors</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">mirror</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">id</span>&gt;</span>nexus-heima<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">mirrorOf</span>&gt;</span>*<span class="tag">&lt;/<span class="name">mirrorOf</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">url</span>&gt;</span>http://localhost:8081/repository/maven-public/<span class="tag">&lt;/<span class="name">url</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">mirror</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">mirrors</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h3 id="9-9-访问私服配置（-项目工程访问私服）"><a href="#9-9-访问私服配置（-项目工程访问私服）" class="headerlink" title="9.9)访问私服配置（ 项目工程访问私服）"></a><strong>9.9)访问私服配置（ 项目工程访问私服）</strong></h3><p>配置当前项目访问私服上传资源的保存位置（pom.xml）</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">distributionManagement</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">repository</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">id</span>&gt;</span>heima-release<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">url</span>&gt;</span>http://localhost:8081/repository/heima-release/<span class="tag">&lt;/<span class="name">url</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">repository</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">snapshotRepository</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">id</span>&gt;</span>heima-snapshots<span class="tag">&lt;/<span class="name">id</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">url</span>&gt;</span>http://localhost:8081/repository/heima-snapshots/<span class="tag">&lt;/<span class="name">url</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">snapshotRepository</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">distributionManagement</span>&gt;</span></span><br></pre></td></tr></table></figure>

<p>发布资源到私服命令</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">mvn deploy</span><br></pre></td></tr></table></figure>

</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="https://gitee.com/tgreen/myl-mm.git">myl</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://gitee.com/tgreen/myl-mm.git/2022/05/09/Maven%E9%AB%98%E7%BA%A7/">https://gitee.com/tgreen/myl-mm.git/2022/05/09/Maven%E9%AB%98%E7%BA%A7/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://gitee.com/tgreen/myl-mm.git" target="_blank">阿毛的博客</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/myl-mm/tags/Maven/">Maven</a></div><div class="post_share"><div class="social-share" data-image="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/gh/overtrue/share.js@master/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/myl-mm/2022/05/09/Dubbo/"><img class="prev-cover" src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="onerror=null;src='/myl-mm/img/404.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">Dubbo</div></div></a></div><div class="next-post pull-right"><a href="/myl-mm/2022/05/09/springMVCday03/"><img class="next-cover" src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="onerror=null;src='/myl-mm/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">SpringMVC-day03</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="this.onerror=null;this.src='/myl-mm/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">myl</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/myl-mm/archives/"><div class="headline">文章</div><div class="length-num">22</div></a><a href="/myl-mm/tags/"><div class="headline">标签</div><div class="length-num">11</div></a><a href="/myl-mm/categories/"><div class="headline">分类</div><div class="length-num">7</div></a></div><a id="card-info-btn" href="https://gitee.com/tgreen/"><i class="fab fa-github"></i><span>Follow Me</span></a></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">欢迎观看，又来一个！</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Maven%E9%AB%98%E7%BA%A7"><span class="toc-number">1.</span> <span class="toc-text">Maven高级</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#1-%E5%88%86%E6%A8%A1%E5%9D%97%E5%BC%80%E5%8F%91%E4%B8%8E%E8%AE%BE%E8%AE%A1"><span class="toc-number">1.1.</span> <span class="toc-text">1)分模块开发与设计</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1-1-%E5%B7%A5%E7%A8%8B%E6%A8%A1%E5%9D%97%E4%B8%8E%E6%A8%A1%E5%9D%97%E5%88%92%E5%88%86"><span class="toc-number">1.1.1.</span> <span class="toc-text">1.1)工程模块与模块划分</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#1-2-ssm-pojo%E6%8B%86%E5%88%86"><span class="toc-number">1.1.2.</span> <span class="toc-text">1.2)ssm_pojo拆分</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#1-3-ssm-dao%E6%8B%86%E5%88%86"><span class="toc-number">1.1.3.</span> <span class="toc-text">1.3)ssm_dao拆分</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#1-4-ssm-service%E6%8B%86%E5%88%86"><span class="toc-number">1.1.4.</span> <span class="toc-text">1.4)ssm_service拆分</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#1-5-ssm-control%E6%8B%86%E5%88%86"><span class="toc-number">1.1.5.</span> <span class="toc-text">1.5)ssm_control拆分</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#2-%E8%81%9A%E5%90%88"><span class="toc-number">1.2.</span> <span class="toc-text">2)聚合</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#2-1-%E5%A4%9A%E6%A8%A1%E5%9D%97%E6%9E%84%E5%BB%BA%E7%BB%B4%E6%8A%A4"><span class="toc-number">1.2.1.</span> <span class="toc-text">2.1)多模块构建维护</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2-2-%E8%81%9A%E5%90%88"><span class="toc-number">1.2.2.</span> <span class="toc-text">2.2)聚合</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-%E7%BB%A7%E6%89%BF"><span class="toc-number">1.3.</span> <span class="toc-text">3)继承</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#3-1-%E6%A8%A1%E5%9D%97%E4%BE%9D%E8%B5%96%E5%85%B3%E7%B3%BB%E7%BB%B4%E6%8A%A4"><span class="toc-number">1.3.1.</span> <span class="toc-text">3.1)模块依赖关系维护</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-2-%E7%BB%A7%E6%89%BF"><span class="toc-number">1.3.2.</span> <span class="toc-text">3.2)继承</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-3-%E7%BB%A7%E6%89%BF%E4%BE%9D%E8%B5%96%E5%AE%9A%E4%B9%89"><span class="toc-number">1.3.3.</span> <span class="toc-text">3.3)继承依赖定义</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-4-%E7%BB%A7%E6%89%BF%E4%BE%9D%E8%B5%96%E4%BD%BF%E7%94%A8"><span class="toc-number">1.3.4.</span> <span class="toc-text">3.4)继承依赖使用</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-5-%E7%BB%A7%E6%89%BF%E7%9A%84%E8%B5%84%E6%BA%90"><span class="toc-number">1.3.5.</span> <span class="toc-text">3.5)继承的资源</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#3-6-%E7%BB%A7%E6%89%BF%E4%B8%8E%E8%81%9A%E5%90%88"><span class="toc-number">1.3.6.</span> <span class="toc-text">3.6)继承与聚合</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#4-%E5%B1%9E%E6%80%A7"><span class="toc-number">1.4.</span> <span class="toc-text">4)属性</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#4-1-%E7%89%88%E6%9C%AC%E7%BB%9F%E4%B8%80%E7%9A%84%E9%87%8D%E8%A6%81%E6%80%A7"><span class="toc-number">1.4.1.</span> <span class="toc-text">4.1)版本统一的重要性</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-2-%E5%B1%9E%E6%80%A7%E7%B1%BB%E5%88%AB"><span class="toc-number">1.4.2.</span> <span class="toc-text">4.2)属性类别</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-3-%E5%B1%9E%E6%80%A7%E7%B1%BB%E5%88%AB%EF%BC%9A%E8%87%AA%E5%AE%9A%E4%B9%89%E5%B1%9E%E6%80%A7"><span class="toc-number">1.4.3.</span> <span class="toc-text">4.3)属性类别：自定义属性</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-4-%E5%B1%9E%E6%80%A7%E7%B1%BB%E5%88%AB%EF%BC%9A%E5%86%85%E7%BD%AE%E5%B1%9E%E6%80%A7"><span class="toc-number">1.4.4.</span> <span class="toc-text">4.4)属性类别：内置属性</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-5-%E5%B1%9E%E6%80%A7%E7%B1%BB%E5%88%AB%EF%BC%9ASetting%E5%B1%9E%E6%80%A7"><span class="toc-number">1.4.5.</span> <span class="toc-text">4.5)属性类别：Setting属性</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-6-%E5%B1%9E%E6%80%A7%E7%B1%BB%E5%88%AB%EF%BC%9AJava%E7%B3%BB%E7%BB%9F%E5%B1%9E%E6%80%A7"><span class="toc-number">1.4.6.</span> <span class="toc-text">4.6)属性类别：Java系统属性</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#4-7-%E5%B1%9E%E6%80%A7%E7%B1%BB%E5%88%AB%EF%BC%9A%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E5%B1%9E%E6%80%A7"><span class="toc-number">1.4.7.</span> <span class="toc-text">4.7)属性类别：环境变量属性</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#5-%E7%89%88%E6%9C%AC%E7%AE%A1%E7%90%86"><span class="toc-number">1.5.</span> <span class="toc-text">5)版本管理</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#5-1-%E5%B7%A5%E7%A8%8B%E7%89%88%E6%9C%AC%E5%8C%BA%E5%88%86"><span class="toc-number">1.5.1.</span> <span class="toc-text">5.1)工程版本区分</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-2-%E5%B7%A5%E7%A8%8B%E7%89%88%E6%9C%AC"><span class="toc-number">1.5.2.</span> <span class="toc-text">5.2)工程版本</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#5-3-%E5%B7%A5%E7%A8%8B%E7%89%88%E6%9C%AC%E5%8F%B7%E7%BA%A6%E5%AE%9A"><span class="toc-number">1.5.3.</span> <span class="toc-text">5.3)工程版本号约定</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#6-%E8%B5%84%E6%BA%90%E9%85%8D%E7%BD%AE"><span class="toc-number">1.6.</span> <span class="toc-text">6)资源配置</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#6-1-%E8%B5%84%E6%BA%90%E9%85%8D%E7%BD%AE%E5%A4%9A%E6%96%87%E4%BB%B6%E7%BB%B4%E6%8A%A4"><span class="toc-number">1.6.1.</span> <span class="toc-text">6.1)资源配置多文件维护</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#6-2-%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E5%BC%95%E7%94%A8pom%E5%B1%9E%E6%80%A7"><span class="toc-number">1.6.2.</span> <span class="toc-text">6.2)配置文件引用pom属性</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#7-%E5%A4%9A%E7%8E%AF%E5%A2%83%E5%BC%80%E5%8F%91%E9%85%8D%E7%BD%AE"><span class="toc-number">1.7.</span> <span class="toc-text">7)多环境开发配置</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#7-1-%E5%A4%9A%E7%8E%AF%E5%A2%83%E5%85%BC%E5%AE%B9"><span class="toc-number">1.7.1.</span> <span class="toc-text">7.1)多环境兼容</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-2-%E5%A4%9A%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE"><span class="toc-number">1.7.2.</span> <span class="toc-text">7.2)多环境配置</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#7-3-%E5%8A%A0%E8%BD%BD%E6%8C%87%E5%AE%9A%E7%8E%AF%E5%A2%83"><span class="toc-number">1.7.3.</span> <span class="toc-text">7.3)加载指定环境</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#8-%E8%B7%B3%E8%BF%87%E6%B5%8B%E8%AF%95"><span class="toc-number">1.8.</span> <span class="toc-text">8)跳过测试</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#8-1-%E8%B7%B3%E8%BF%87%E6%B5%8B%E8%AF%95%E7%8E%AF%E8%8A%82%E7%9A%84%E5%BA%94%E7%94%A8%E5%9C%BA%E6%99%AF"><span class="toc-number">1.8.1.</span> <span class="toc-text">8.1)跳过测试环节的应用场景</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#8-2-%E4%BD%BF%E7%94%A8%E5%91%BD%E4%BB%A4%E8%B7%B3%E8%BF%87%E6%B5%8B%E8%AF%95"><span class="toc-number">1.8.2.</span> <span class="toc-text">8.2)使用命令跳过测试</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#8-3-%E4%BD%BF%E7%94%A8%E7%95%8C%E9%9D%A2%E6%93%8D%E4%BD%9C%E8%B7%B3%E8%BF%87%E6%B5%8B%E8%AF%95"><span class="toc-number">1.8.3.</span> <span class="toc-text">8.3)使用界面操作跳过测试</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#8-4-%E4%BD%BF%E7%94%A8%E9%85%8D%E7%BD%AE%E8%B7%B3%E8%BF%87%E6%B5%8B%E8%AF%95"><span class="toc-number">1.8.4.</span> <span class="toc-text">8.4)使用配置跳过测试</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#9-%E7%A7%81%E6%9C%8D"><span class="toc-number">1.9.</span> <span class="toc-text">9)私服</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#9-1-%E5%88%86%E6%A8%A1%E5%9D%97%E5%90%88%E4%BD%9C%E5%BC%80%E5%8F%91"><span class="toc-number">1.9.1.</span> <span class="toc-text">9.1)分模块合作开发</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#9-2-Nexus"><span class="toc-number">1.9.2.</span> <span class="toc-text">9.2)Nexus</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#9-3-Nexus-%E5%AE%89%E8%A3%85%E3%80%81%E5%90%AF%E5%8A%A8%E4%B8%8E%E9%85%8D%E7%BD%AE"><span class="toc-number">1.9.3.</span> <span class="toc-text">9.3)Nexus*安装、启动与配置</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#9-4-%E7%A7%81%E6%9C%8D%E8%B5%84%E6%BA%90%E8%8E%B7%E5%8F%96"><span class="toc-number">1.9.4.</span> <span class="toc-text">9.4)私服资源获取</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#9-5-%E4%BB%93%E5%BA%93%E5%88%86%E7%B1%BB"><span class="toc-number">1.9.5.</span> <span class="toc-text">9.5)仓库分类</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#9-6-%E8%B5%84%E6%BA%90%E4%B8%8A%E4%BC%A0"><span class="toc-number">1.9.6.</span> <span class="toc-text">9.6)资源上传</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#9-7-idea%E7%8E%AF%E5%A2%83%E4%B8%AD%E8%B5%84%E6%BA%90%E4%B8%8A%E4%BC%A0%E4%B8%8E%E4%B8%8B%E8%BD%BD"><span class="toc-number">1.9.7.</span> <span class="toc-text">9.7)idea环境中资源上传与下载</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#9-8-%E8%AE%BF%E9%97%AE%E7%A7%81%E6%9C%8D%E9%85%8D%E7%BD%AE%EF%BC%88%E6%9C%AC%E5%9C%B0%E4%BB%93%E5%BA%93%E8%AE%BF%E9%97%AE%E7%A7%81%E6%9C%8D%EF%BC%89"><span class="toc-number">1.9.8.</span> <span class="toc-text">9.8)访问私服配置（本地仓库访问私服）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#9-9-%E8%AE%BF%E9%97%AE%E7%A7%81%E6%9C%8D%E9%85%8D%E7%BD%AE%EF%BC%88-%E9%A1%B9%E7%9B%AE%E5%B7%A5%E7%A8%8B%E8%AE%BF%E9%97%AE%E7%A7%81%E6%9C%8D%EF%BC%89"><span class="toc-number">1.9.9.</span> <span class="toc-text">9.9)访问私服配置（ 项目工程访问私服）</span></a></li></ol></li></ol></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/myl-mm/2022/05/09/RabbitMQ%20Windows%20%E5%AE%89%E8%A3%85/" title="RabbitMQ Windows 安装"><img src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="RabbitMQ Windows 安装"/></a><div class="content"><a class="title" href="/myl-mm/2022/05/09/RabbitMQ%20Windows%20%E5%AE%89%E8%A3%85/" title="RabbitMQ Windows 安装">RabbitMQ Windows 安装</a><time datetime="2022-05-09T09:04:30.600Z" title="发表于 2022-05-09 17:04:30">2022-05-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/myl-mm/2022/05/09/gateway%E5%86%85%E7%BD%AE%E8%BF%87%E6%BB%A4%E5%99%A8%E5%B7%A5%E5%8E%82/" title="Spring Cloud Gateway 内置的过滤器工厂"><img src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="Spring Cloud Gateway 内置的过滤器工厂"/></a><div class="content"><a class="title" href="/myl-mm/2022/05/09/gateway%E5%86%85%E7%BD%AE%E8%BF%87%E6%BB%A4%E5%99%A8%E5%B7%A5%E5%8E%82/" title="Spring Cloud Gateway 内置的过滤器工厂">Spring Cloud Gateway 内置的过滤器工厂</a><time datetime="2022-05-09T09:04:19.065Z" title="发表于 2022-05-09 17:04:19">2022-05-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/myl-mm/2022/05/09/Turbine%E6%90%AD%E5%BB%BA%E6%AD%A5%E9%AA%A4/" title="Turbine"><img src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="Turbine"/></a><div class="content"><a class="title" href="/myl-mm/2022/05/09/Turbine%E6%90%AD%E5%BB%BA%E6%AD%A5%E9%AA%A4/" title="Turbine">Turbine</a><time datetime="2022-05-09T09:04:13.000Z" title="发表于 2022-05-09 17:04:13">2022-05-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/myl-mm/2022/05/09/Eureka%20%E5%85%A8%E9%83%A8%E9%85%8D%E7%BD%AE%20/" title="Euraka配置详解"><img src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="Euraka配置详解"/></a><div class="content"><a class="title" href="/myl-mm/2022/05/09/Eureka%20%E5%85%A8%E9%83%A8%E9%85%8D%E7%BD%AE%20/" title="Euraka配置详解">Euraka配置详解</a><time datetime="2022-05-09T09:03:49.699Z" title="发表于 2022-05-09 17:03:49">2022-05-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/myl-mm/2022/05/09/01-Springboot-day01/" title="springBootday01"><img src="https://itcast-haoke-myl.oss-cn-beijing.aliyuncs.com/images/2022/04/13/cat1.jpg" onerror="this.onerror=null;this.src='/myl-mm/img/404.jpg'" alt="springBootday01"/></a><div class="content"><a class="title" href="/myl-mm/2022/05/09/01-Springboot-day01/" title="springBootday01">springBootday01</a><time datetime="2022-05-09T09:03:15.476Z" title="发表于 2022-05-09 17:03:15">2022-05-09</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2022 By myl</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/myl-mm/js/utils.js"></script><script src="/myl-mm/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js"></script><div class="js-pjax"></div><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>